package com.example.springaopdemo.demos.web.controller;

import com.example.springaopdemo.demos.web.aspect.CostTime;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Q
 * @create 2025-06-16-15:35
 */
@RequestMapping("/test")
@RestController
public class TestController {
    @RequestMapping("/t1")
    public String t1(){
        int[] arr = {1,2,3};
        System.out.println(arr[2]);
        return "t1";
    }
    @CostTime
    @RequestMapping("/t2")
    public Integer t2(){
        return 10;
    }
//    @RequestMapping("/t3")
//    public Boolean t3(){
//        String a = null;
//        System.out.println(a.length());
//        return true;
//    }
}
